<?php

abstract class BaseModel extends Model {
    
    public function setFields($whitelist, $data) {
        
        foreach($whitelist as $key) {
            if(array_key_exists($key, $data)) {
                $this->$key = $data[$key];
            }
        }
    }
}
